//
//  YYViewController.m
//  YYTransitionAnimation
//
//  Created by 16183898 on 03/26/2024.
//  Copyright (c) 2024 16183898. All rights reserved.
//

#import "YYViewController.h"
#import "UIViewController+YYTransitioning.h"
#import "PushViewController.h"
#import "PresentViewController.h"
@interface YYViewController ()

@end

@implementation YYViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    UIButton *pushBtn = [UIButton new];
    [pushBtn setTitle:@"pushButton" forState:UIControlStateNormal];
    pushBtn.frame = CGRectMake(100, 200, 200, 40);
    pushBtn.backgroundColor = UIColor.redColor;
    
    UIButton *presentBtn = [UIButton new];
    [presentBtn setTitle:@"presentBtn" forState:UIControlStateNormal];
    presentBtn.frame = CGRectMake(100, 300, 200, 40);
    presentBtn.backgroundColor = UIColor.blueColor;
    
    [self.view addSubview:pushBtn];
    [self.view addSubview:presentBtn];
    
    [pushBtn addTarget:self action:@selector(pushVC) forControlEvents:UIControlEventTouchUpInside];
    [presentBtn addTarget:self action:@selector(presentVC) forControlEvents:UIControlEventTouchUpInside];

}

- (void)pushVC {
    [self yy_showViewController:[PushViewController new] transitioning:kTransitioningTypePush interacting:true completion:^{
        
    }];
}
- (void)presentVC {
    [self yy_showViewController:[PresentViewController new] transitioning:kTransitioningTypePresent interacting:true completion:^{
        
    }];
}


@end
